#ifndef _MCUDRIVERS_ADC_ADC_H
#define _MCUDRIVERS_ADC_ADC_H

#include <xc.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>

//ADC通道定义
#define ADC_MotherCurrent_AN1_Channel 1
#define ADC_MotherVoltage_AN2_Channel 2
#define ADC_MCUInputVoltag_AN3_Channel 3


void ADC1_Initialize_g(void);

inline static void ADC1_SamplingStart(void) {
    AD1CON1bits.SAMP = 1;
}

inline static void ADC1_SamplingStop(void) {
    AD1CON1bits.SAMP = 0;
}

uint16_t AdcSwitch(uint16_t channel);


#endif //_ADC1_H

